﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace DIST.LR.ZHJG.Pgybc.WCF.Interface
{
    [ServiceContract] //服务契约
    public interface IServiceManager<T>
    {
        /// <summary>
        /// 查
        /// </summary>
        /// <param name="hsql"></param>
        /// <returns></returns>
        [OperationContract] //操作契约
        IList<T> Select(string hsql="");

        /// <summary>
        /// 增
        /// </summary>
        /// <param name="infos">对象</param>
        /// <returns></returns>
        [OperationContract]
        void Add(IList<T> infos);

        /// <summary>
        /// 改
        /// </summary>
        /// <param name="infos">对象</param>
        /// <returns>返回true或false</returns>
        [OperationContract]
        bool Update(IList<T> infos);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="infos">集合</param>
        /// <returns>返回true或false</returns>
        [OperationContract]
        bool Delete(IList<T> infos);
    }
}